#include <reg52.h>
void delay1ms(unsigned int i)
{
	unsigned char j;
	while(i--)
		for(j=0;j<125;j++);
}

void main()
{
	unsigned char temp,k;
	while(1)
	{
		temp=0x01;
		for(k=0;k<8;k++)
		{
			P1=~temp;
			delay1ms(500);
			temp<<=1;
		}
	}
}